From: Jonas Dreßler Date: Sun, 16 Feb 2020 22:16:52 +0000 (+0100) Subject: userWidget: Always set actor size inside update() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~772^2^2~108 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2a3875775d91a821d804800abd423e61cb76aae4;p=gnome-shell.git userWidget: Always set actor size inside update() We also want to ensure the Avatar StBin is sized correctly when an icon child is used, so always set the actor size inside the `update()` function. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1018 --- diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index d749ceebe..c84b840ce 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -83,13 +83,13 @@ class Avatar extends St.Bin { iconFile = null; } + let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage); + this.set_size( + this._iconSize * scaleFactor, + this._iconSize * scaleFactor); + if (iconFile) { this.child = null; - - let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage); - this.set_size( - this._iconSize * scaleFactor, - this._iconSize * scaleFactor); this.style = ` background-image: url("${iconFile}"); background-size: cover;`;